<template>
	<div id='tmpl'>
		<div class='title'>
			<h2 v-text='info.title'></h2>
			<p>{{info.add_time | datefmt('YYYY-MM-DD')}} {{info.click}}次浏览量</p>
		</div>
		<div id='content' v-html="info.content">

		</div>
	</div>
</template>

<script>
	export default{
		data(){
		    return{
		        id:0,
				info:{
                    "id": 14,
                    "title": "买房还是炒股，2015年买房无法拒绝的5大理由",
                    "click": 2,
                    "add_time": "2015-04-16T04:05:34.000Z",
                    "content":"hehe"
				}
			}
		},
		created(){
		    //获取URL传入的id参数值赋值给data中的ID属性
			this.id=this.$route.params.id
		}
	}
</script>	

<style scoped>
	.title{
		color: #0094ff;
	}
	.title p{
		color:rgba(0,0,0,0.5);
	}
	.title,#content{
		padding:10px;
	}
</style>